package com.sf.fy.uav.task.controller;

import com.sf.fy.uav.task.entity.TaskStatusLog;
import com.sf.fy.uav.task.service.ITaskStatusLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;

import java.util.List;

/**
 * <p>
 * 状态日志 前端控制器
 * </p>
 *
 * @author LTQ
 * @since 2023-04-18
 */
@Controller
@RequestMapping("/sys/taskStatusLog")
public class TaskStatusLogRest {
    @Autowired
    private ITaskStatusLogService iTaskStatusLogService;

    //    @CacheEvict(value = "CITY::TASK_STATUS_LOG", key = "#taskStatusLog.taskId")
    public void add(TaskStatusLog taskStatusLog) {
        iTaskStatusLogService.addTaskStatusLog(taskStatusLog);
    }


    public List<TaskStatusLog> selectListByTaskId(String taskId) {
        return iTaskStatusLogService.selectListByTaskId(taskId);
    }
}
